function template(title, style, relations, data) {


    if (!Array.isArray(relations) || !Array.isArray(data)) {

        console.info("数据格式错误");

        return [];
    }



    let dimensionMap = {};



    for (let relation of relations) {

        let field = relation['resultColumn']['columnField'];

        let name = relation['resultColumn']['columnDesc'];

        dimensionMap[field] = name;

    }

    let html = "<table>"

    html += "<tr>";
    for(let field in dimensionMap){

        html += "<th>";

        html += dimensionMap[field];

        html += "</th>"
    }

    html += "</tr>";

    for(let row of data){


        html += "<tr>";
        for(let field in dimensionMap){

            html += "<td>";

            html += row[field];

            html += "</td>"
        }

        html += "</tr>";


    }



    html += "</table>";


    return html;

}